﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Web;
using System.Web.Mvc;
using MLSMooc.BO;
using MLSMooc.DAO.Implement.Menu;
using MLSMooc.Helper;


namespace MLSMooc.Controllers
{
    public class MenuController : Controller
    {
        private static MenuDAO menuDAO = MenuDAO.Getinstance();

        [HttpGet]
        public async Task<string> GetMenuAsync()
        {
            var res = await menuDAO.GetMenuAsync();
            return SerializeHelper.SerializeJson(res);
        }

        [HttpGet]
        public async Task<string> GetMenuResourceList()
        {
            var res = await menuDAO.GetMenuResourceList();
            return SerializeHelper.SerializeJson(res);
        }

    }
}